#ifndef FILE_LOADER_H
#define FILE_LOADER_H

#include <QPluginLoader>
#include <QString>
#include <QtCore/QCoreApplication>
#include <QTextStream>
#include <QFile>

#include "../plugin.h"
#include "../data/fileplugin.h"
#include "../data/reg3dvolumedata.h"
#include "../data/proteindata.h"

namespace PBVP {
	class FileLoader
	{
	public: 
		//constructor	
		FileLoader(int argc, char *argv[]);

		//Qplugin
		void loadPlugin(int argc, char *argv[]);
		PBVP::FilePluginInterface* pdbPlugin;
		PBVP::FilePluginInterface* rawPlugin;
		PBVP::FilePluginInterface* rawivPlugin;
		PBVP::FilePluginInterface* rawncPlugin;

		//file
		QString getFName(QString pdbName, QString id, int index, QString extension);
		QString dir;
		void loadRawivFile(QString srchString, QString type, std::vector<Reg3DVolumeData*> &volumeDataVector);
		QStringList getPdbFileList(void);
		void write(QString str, double vol);
		void write(QString str, QString value);
		void setFileName(QString pdbName);
	
		QFile *file;

	};
}
#endif

